package br.ufal.ic.ml;

public class RunnerAwayAction extends Action {
	private Action2D action;
	
	public RunnerAwayAction(Action2D action) {
		this.action = action;
	}
	
	public RunnerAwayAction(int action) {
		setAction(action);
	}
	
	public void setAction(Action2D action) {
		this.action = action;
	}
	
	public void setAction(int action) {
		switch (action) {
			case 0:
				this.action = Action2D.TO_UP;
				break;
				
			case 1:
				this.action = Action2D.TO_DOWN;
				break;
	
			case 2:
				this.action = Action2D.TO_LEFT;
				break;
	
			case 3:
				this.action = Action2D.TO_RIGHT;
				break;
	
	
			default:
				break;
		}
	}

	
	public Action2D getAction() {
		return this.action;
	}
	
	public int getValue() {
		return action.getValue();
	}

}
